package com.cindata

import com.cindata.dictionary.*

class AbnormalMortgageBatchFlowStage
{

    Integer executionSequence
    AbnormalMortgageBatchStage stage
    Boolean canReject = true
    Date startTime
    Date endTime
    String comments
    Layout layout
    // Document document
    Boolean processed = false

    static belongsTo = [batch: AbnormalMortgageBatch]

    static hasMany = [conditions: AbnormalMortgageBatchFlowStageCondition, roles: AbnormalMortgageBatchFlowStageRole]

    static constraints =
        {
            executionSequence unique: ['batch'], min: 1, max: 10000
            stage unique: ['batch']
            startTime nullable: true, blank: true
            endTime nullable: true, blank: true
            comments blank: true, nullable: true
            comments type: "text"
            layout nullable: true, blank: true
            // document nullable: true, blank: true
        }

    static mappedBy = [conditions: 'flowStage']

    static mapping = {

    }
}
